//package com.pony.iphone.mapper;
//
//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
//import com.pony.iphone.entity.QuestionStable;
//import org.apache.ibatis.annotations.Mapper;
//import org.apache.ibatis.annotations.Param;
//import org.apache.ibatis.annotations.Select;
//import org.apache.ibatis.annotations.Update;
//
///**
// * @author pony
// * @create 2025-11-05 17:39
// */
//@Mapper
//public interface QuestionStableMapper extends BaseMapper<QuestionStable> {
//
//    /**
//     * 根据问题ID获取当前稳定版本
//     */
//    @Select("SELECT * FROM t_question_stable WHERE question_id = #{questionId} AND is_current = 1")
//    QuestionStable selectCurrentByQuestionId(@Param("questionId") Long questionId);
//
//    /**
//     * 根据问题ID获取最大版本号
//     */
//    @Select("SELECT MAX(version) FROM t_question_stable WHERE question_id = #{questionId}")
//    Long selectMaxVersionByQuestionId(@Param("questionId") Long questionId);
//
//    /**
//     * 将指定问题的当前版本标记为非当前
//     */
//    @Update("UPDATE t_question_stable SET is_current = 0 WHERE question_id = #{questionId} AND is_current = 1")
//    int updateCurrentToHistory(@Param("questionId") Long questionId);
//}